import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import postcss from './postcss.config'
import { UnifiedViteWeappTailwindcssPlugin as uvwt } from 'weapp-tailwindcss/vite';
const isH5 = process.env.UNI_PLATFORM === 'h5'
const isApp = process.env.UNI_PLATFORM === 'app'
const weappTailwindcssDisabled = isH5 || isApp
// https://vitejs.dev/config/
export default defineConfig({
    plugins: [uni(), weappTailwindcssDisabled ? undefined : uvwt({
        rem2rpx: true
    })],
    css: {
        postcss
    }
});
